Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

modules: explicitly initialize CJS loader #27313

Closed
wants to merge 1 commit into from

Conversation

joyeecheung
Copy link
Member

Explicitly initialize the CJS loader with module._initPaths()
instead of making it a side-effect of requiring
internal/modules/cjs/loader - that makes it harder to reason about
when it's safe to load internal/modules/cjs/loader.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Explicitly initialize the CJS loader with `module._initPaths()`
instead of making it a side-effect of requiring
`internal/modules/cjs/loader` - that makes it harder to reason about
when it's safe to load `internal/modules/cjs/loader`.
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

Landed in 7c816b7

joyeecheung added a commit that referenced this pull request Apr 22, 2019
Explicitly initialize the CJS loader with `module._initPaths()`
instead of making it a side-effect of requiring
`internal/modules/cjs/loader` - that makes it harder to reason about
when it's safe to load `internal/modules/cjs/loader`.

PR-URL: #27313
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants